import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "@/styles/reset.less";
import "@/assets/fonts/font.less";
import "@/language/index";
import "virtual:svg-icons-register";
import { PersistGate } from "redux-persist/integration/react";
import { Provider } from "react-redux";
import { store, persistor } from "@/redux";
import App from "@/App";
import "tdesign-react/es/style/index.css"; // 少量公共样式

// 获取根DOM元素
const container = document.getElementById("root");
if (container) {
	// 创建根
	const root = createRoot(container);
	root.render(
		// * react严格模式
		<StrictMode>
			<Provider store={store}>
				<PersistGate persistor={persistor}>
					<App />
				</PersistGate>
			</Provider>
		</StrictMode>
	);
} else {
	console.error("Failed to find the root element");
}
